package cn.com.cifi.mars.mapper.mars;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import cn.com.cifi.mars.bean.dto.ProjectToDoDto;
import cn.com.cifi.mars.bean.dto.SysRoleDto;
import cn.com.cifi.mars.bean.dto.SysToDoDto;
import cn.com.cifi.mars.bean.vo.monitoringConsole.PortalTodoVo;
import cn.com.cifi.mars.bean.vo.workBench.ToDoTypeVo;
import cn.com.cifi.mars.entity.PortalTodo;

/**
 * <p>
 * 门户待办主表 Mapper 接口
 * </p>
 *
 * @author plx
 * @since 2020-01-10
 */
public interface PortalTodoMapper extends BaseMapper<PortalTodo> {

	
	
	/**
	    * 项目待办提醒分页
	    * @param current 当前第几页
	    * @param pageSize 每页条数
	    * @param projectId 项目id
	    * @param stagesId 分期id
	    * @param typeId 类型id
	    * @param state 处理状态
	    * @return
	*/
    List<ProjectToDoDto>selectPorjectToDoList(@Param("page")Page page,
    		@Param("projectId")String projectId,@Param("stagesId") String stagesId,
    		@Param("typeId")String typeId,@Param("state") String state);
    
    /**
     * 系统待办提醒分页
     * @param current 当前第几页
     * @param pageSize 每页条数
     * @param nameOrCode 项目名称或者项目编码
     * @param typeId 类型id
     * @param state 处理状态
     * @return
     */
    List<SysToDoDto>selectSysToDoList(@Param("page")Page page,
    		@Param("nameOrCode")String nameOrCode,
    		@Param("typeId")String typeId,@Param("state") String state,
    		@Param("projectIds")List<String>projectIds);
    
    /**
     * 根据标题查询门户待办id集合
     * @param title
     * @return
     */
    List<String> selectByTitle(@Param("title")String title);
    
    /**
     * 根据门户待办id查看门户待办
     * @return
     */
    PortalTodoVo selectByInstanceId(@Param("instanceId")String instanceId);

	List<PortalTodoVo> selectToDoInfo(@Param("todoTypeCode") String todoTypeCode, @Param("projectId")String projectId,@Param("instanceId") String instanceId);

	List<PortalTodo> selectByTodoTypeCode(@Param("todoTypeCode")String todoTypeCode, @Param("todoStatus")String todoStatus);

	List<PortalTodo> selectProjectId(@Param("projectId")String projectId, @Param("todoStatus")String todoStatus);
	/**
	 * 根据关联id查询门户代办
	 */
	PortalTodo selectByVersionIdAndTodoTypeCode(@Param("versionId") String id,@Param("todoTypeCode")String todoTypeCode);

	PortalTodo selectByIdAndTodoStatus(@Param("instanceId")String instanceId, @Param("todoStatus")String todoStatus);
	
	
}
